import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import LoginView from '@/views/LoginView.vue'


const routes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'login',
    meta: {
      keepAlive: false
    },
    component: LoginView,
  },
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/HomeView.vue'),
    children: [
      {
        path: '/index',
        name: 'index',
        component: () => import('../views/IndexView.vue'),
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
